---
- name: Install on Linux
  when: ansible_distribution == "Ubuntu"
  ansible.builtin.import_tasks: linux.yml
  become: true
  tags:
    - starship

- name: Install on MacOS
  when: ansible_distribution == "MacOSX"
  ansible.builtin.import_tasks: macos.yml
  tags:
    - starship

- name: Link config
  ansible.builtin.file:
    src: "{{ role_path }}/files/starship.toml"
    dest: "{{ user_config_dir }}/starship.toml"
    state: link
  tags:
    - starship
